// import api from './apilist';
export default {
  moduleClientRoute: {    //路由属性
    state: {
      token: "",
      page: 7,   //表格当页 条数
      ShoppingMall: 16,
      name: '',
      navindex: 1,
      Userinfo: {'lock':true}, //用户详情
      ClassImage: {},//获取图片
      GoodsInfo: {},//商品详情
      GoodsValue: [],//储蓄 搜索商品的数据
      Crypto_name: 'Userinfo',
      Lostorage_name: "Cry",
      OrderAll: 0,  //购买商品数量
      Order_Goods: [],// 我的库存
      lower_GoodsNumber: 0,// 当前竞价商品数量下底部导航栏显示
      pages: 4,
      userinfo_img: '1',
      FalhLogin: true,     //获取用户登录状态     false没有登陆 会跳转登陆
      Logintype:false, //用户 是否重新状态 切换账号 true换号了 false没有
      flashloginFn:false, //flashlogin方法  true调用了   false没有调用
    },
    mutations: {
      asstoken(state,val){
        state.token = val
      },
      SetflashloginFn(state, val){
        state.flashloginFn = val
      },
      SetLogintype(state, val){
        state.Logintype = val
      },
      Setxiugaimoney(state, val){
        state.Userinfo.user_info.money = val
      },
      Setuserinfo_money(state, val){ //扣除金额
        state.Userinfo.user_info.money = state.Userinfo.user_info.money-val;
      },
      Setuserinfo_img(state, val){
        state.userinfo_img = val;
      },
      Setpages(state, val){
        state.pages = val;
      },
      SetFalhLogin(state, val){
        state.FalhLogin = val;
      },
      Setlower_GoodsNumber(state, val){
        state.lower_GoodsNumber = state.lower_GoodsNumber + val;
      },
      SetClerl_lower_GoodsNumber(state, val){
        state.lower_GoodsNumber = val;
      },
      SetUserInfo(state, val){  //
        state.Userinfo = val;
      },
      SetUseruser_info(state, val){  //
        state.Userinfo.user_info = val;
      },

      SetGoodsInfo(state, val){  //商品详情
        state.GoodsInfo = val;
      },
      SetOrderAll(state, val){  //购买商品数量
        state.OrderAll = state.OrderAll + val;
      },
      SetOrder_Goods(state, data){
        state.Order_Goods = data
      },

      //底部导航栏下标
      getnavindex(state, data){
        state.navindex = data
      },
      SetClassImage(state, data){
        state.ClassImage = data;
        // console.log(state.ClassImage);
      },
      SetGoodsValue(state, data){
        state.GoodsValue = data;
      }

    },
    actions: {},
    getters: {
      GetflashloginFn: state =>{
        return state.flashloginFn;
      },
      GetLogintype: state =>{
        return state.Logintype;
      },
      Getuserinfoimg: state => {
        return state.userinfo_img;
      },
      Getpages: state => {
        return state.pages;
      },
      GetFalhLogin: state => {
        return state.FalhLogin;
      },
      Getlower_GoodsNumber: state => {
        return state.lower_GoodsNumber;
      },
      GetClassImage: state => {   //获取所有图片
        return state.ClassImage;
      },
      GetGoodsInfo: state => {   //
        return state.GoodsInfo;
      },
      //返回下方导航栏下标
      renavindex: state => {
        return state.navindex
      },
      GetGoodsValue: state => {
        return state.GoodsValue
      },
      GetUserInfo: state => {
        return state.Userinfo
      },
      GetOrder_Goods: state => {
        return state.Order_Goods
      },

    }
  },


  moduleClientarray: {     //  PC数据存放
    state: {},
    mutations: {},
    actions: {},
    getters: {},
  }
}



